package sctu.edu.java.year2016.team02.huangguojing.day20160520.Chapter5_3;

/**
 * Created by Eoly on 2016/5/20.
 * 创建二维数组arr[][]将二维数组所有元素和输出
 */
public class Work_5_3 {
    public static void main(String[] args) {
        int arr[][] = new int[][]{{1, 5},{6, 89}, {5, 4}, {5, 6}, {82, 8}};int sum=0;
        for (int[] i : arr)
            for(int j:i) {
                sum+=j;
                System.out.print(j + "\t");
            }
        System.out.println("\nSum is:"+sum);
    }
}
